{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 一.基本思路：类内距离最小化，类间距离最大化\n",
    "这一节介绍一种监督式的降维方式，线性判别分析（linear discriminant analysis，LDA），它的核心思想是找一条直线使得：类内距离尽可能的小，内间距离尽可能的大，下面画图简单说明一下，并与上一节的PCA做一个区分\n",
    "![avatar](./source/19_lda1.png)  \n",
    "\n",
    "如图，红色和绿色分别表示不同类别的样本点，LDA找一条的新的坐标轴将它们分离开，而PCA是一种无监督的降维方式，倾向于将数据投影分散，而不会在乎它们的类别，接下来，我们需要去寻找一个量化指标，与PCA类似地，我们同样可以选择方差，对于二分类的情况，我们可以如此定义   \n",
    "\n",
    "#### 二分类\n",
    "\n",
    "两个类别对应的样本集合分别为$X_0,X_1$，中心点分别为$\\mu_0,\\mu_1$，投影坐标表示为$w$，那么：   \n",
    "\n",
    "（1）类间方差可以表示为$\\left|\\left|w^T\\mu_0-w^T\\mu_1\\right|\\right|_2^2=w^T(\\mu_0-\\mu_1)(\\mu_0-\\mu_1)^Tw$  \n",
    "\n",
    "（2）类内方差可以表示为$w^T(\\Sigma_0+\\Sigma_1)w$，这里：   \n",
    "\n",
    "$$\n",
    "\\Sigma_0=\\sum_{x\\in X_0}(x-\\mu_0)(x-\\mu_0)^T\\\\\n",
    "\\Sigma_1=\\sum_{x\\in X_1}(x-\\mu_1)(x-\\mu_1)^T\n",
    "$$  \n",
    "\n",
    "为了方便表示，我们定义：   \n",
    "\n",
    "$$\n",
    "S_b=(\\mu_0-\\mu_1)(\\mu_0-\\mu_1)^T\\\\\n",
    "S_w=\\Sigma_0+\\Sigma_1\n",
    "$$  \n",
    "\n",
    "所以，我们的优化目标便有了：   \n",
    "\n",
    "$$\n",
    "arg\\max_w \\frac{w^TS_bw}{w^TS_ww}\n",
    "$$  \n",
    "\n",
    "#### 多分类\n",
    "\n",
    "作为二分类的推广，对于有$j=1,2,..,k$种类别，定义每种类别对应的样本集为$X_j$，样本中心点为$\\mu_j$，样本量为$N_j$，整体中心点为$\\mu$，我们可以定义   \n",
    "\n",
    "$$\n",
    "S_b=\\sum_{j=1}^kN_j(\\mu_j-\\mu)(\\mu_j-\\mu)^T\\\\\n",
    "S_w=\\sum_{j=1}^k\\sum_{x\\in X_j}(x-\\mu_j)(x-\\mu_j)^T\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 二.广义Rayleigh商求解\n",
    "\n",
    "接下来就是对于如下表达式的优化问题，其中$A$为对称矩阵（对应$S_b$），$B$为正定对称矩阵（对应$S_w$） ,这便是广义瑞利商  \n",
    "\n",
    "$$\n",
    "arg\\max_w\\frac{w^TAw}{w^TBw}\n",
    "$$  \n",
    "\n",
    "对于该问题的求解，我们先考虑简单一点的情况，即瑞利商：   \n",
    "\n",
    "$$\n",
    "\\frac{w^TAw}{w^Tw}\n",
    "$$\n",
    "\n",
    "这个最优解其实在PCA中已经做了推导，瑞利商的最大值即是矩阵$A$特征分解对应的最大特征值，最优解$w$即是最大特征值对应的特征向量（的非零倍数），求解广义RayLeigh商的的思路便是将其变形为一般的瑞利商，即：   \n",
    "\n",
    "$$\n",
    "\\frac{w^TAw}{w^TBw}\\Rightarrow \\frac{w^TCw}{w^Tw}\n",
    "$$  \n",
    "\n",
    "我们令$\\tilde{w}=B^{1/2}w$，这里$B^{1/2}$表示正定矩阵$B$的平方根，即有$B_{ij}^{1/2}=\\sqrt{B_{ij}}$，那么有：   \n",
    "\n",
    "$$\n",
    "\\frac{w^TAw}{w^TBw}=\\frac{\\tilde{w}^T(B^{-1/2})^TA(B^{-1/2})\\tilde{w}}{\\tilde{w}^T\\tilde{w}}\n",
    "$$  \n",
    "\n",
    "所以，我们对矩阵$(B^{-1/2})^TA(B^{-1/2})$进行特征分解，并求得最大特征值对应特征向量便是$\\tilde{w}$的最优解$\\tilde{w^*}$，然后再根据$w$与$\\tilde{w}$的关系求解$w$的最优解  \n",
    "\n",
    "$$\n",
    "w^*=B^{-1/2}\\tilde{w^*}\n",
    "$$  \n",
    "\n",
    "由于$B$正定对称，所以$(B^{-1/2})^T=B^{-1/2}$，其实$w^*$即是$B^{-1}A$最大特征值对应的特征向量，假设$(B^{-1/2})^TA(B^{-1/2})$特征分解后的最大特征值为$\\lambda_{max}$，那么有如下推导关系：   \n",
    "\n",
    "$$\n",
    "(B^{-1/2})^TA(B^{-1/2})\\tilde{w^*}=\\lambda_{max}\\tilde{w^*}\\\\  \n",
    "\\Rightarrow B^{-1/2}(B^{-1/2})^TA(B^{-1/2})\\tilde{w^*}=\\lambda_{max}B^{-1/2}\\tilde{w^*}\\\\\n",
    "\\Rightarrow B^{-1}A(B^{-1/2})\\tilde{w^*}=\\lambda_{max}B^{-1/2}\\tilde{w^*}\\\\\n",
    "\\Rightarrow B^{-1}Aw^*=\\lambda_{max}w^*\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 三.代码实现\n",
    "\n",
    "根绝上面的推导核心代码其实就很简单了，即首先求出$S_b$和$S_w$，然后再对$S_w^{-1}S_b$做特征分解就可以了，下面构建例子来说明一下"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.datasets import make_classification\n",
    "data,target=make_classification(n_samples=50, n_features=2,\n",
    "                           n_informative=2,n_redundant=0,\n",
    "                           n_repeated=0, n_classes=2,\n",
    "                           n_clusters_per_class=1,\n",
    "                           class_sep=3, random_state=32)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x16e5c78fe48>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAb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gaf+lZ99E98XC6/fpddVYhcR6UJmEYjvhcX36rZraihGRKTCKLGLiFQYJXYRkQqjxC4iUmGU2EVEKkxZasWY2Tzg426/cPsNAbTd37f0ebSkz6Q5fR4tlfIzWc3dh67opLIk9t7CzKa3peBOX6HPoyV9Js3p82ipHJ+JhmJERCqMEruISIVRYm/dpHIH0MPo82hJn0lz+jxa6vbPRGPsIiIVRj12EZEKo8S+Amb2GzP73MxmNv3sWe6YegIzO93M3MyKbUXfZ5jZhWb2v6a/H1PMbJVyx1ROZnaZmb3d9Jn8w8wGlDumcjKzg8zsDTPLmVm3zI5RYm+bP7j7Jk0//yx3MOVmZqsCuwCflDuWHuIyd9/Y3TcBHgF+Xe6AyuwJYIy7bwy8C5xd5njK7XXgAOD57rqgErt0xB+AMym43Xvf4+6Ll3lYTR//XNx9irtnmh6+BIwsZzzl5u5vufs73XlNJfa2Oanp18qbzWxguYMpJzPbF/jc3V8tdyw9iZldbGafAj9GPfZlHQNMLncQfY1mxQBm9iSwUoFDE8n3OL4i3wu7EFjZ3btus8IeYAWfxznAru7+tZl9BIxz94pfQt7aZ+LuDy5z3tlAzN3P67bgyqAtn4eZTQTGAQd4hSeaNn4ezwKnu/v0Lo+nwj/vkjKz0cAj7j6mzKGUhZltBDwFNDQ9NRKYDWzh7l+WLbAexMxWAx7tq39HvmFmRwLHAzu7e8OKzu8LujOxa2u8FTCzld39i6aH3yd/I6RPcvfXgGHfPO5LPfbWmNna7v5e08N9gbfLGU+5mdnuwC+B7ZXUy0M99hUws78Am5AfivkI+Okyib5PU2LPM7P7gHWBHPmqpce7++fljap8zGwWEAXmNz31krsfX8aQysrMvg9cAwwFFgEz3X23Lr2mEruISGXRrBgRkQqjxC4iUmGU2EVEKowSu4hIhVFiFxGpMErsIiIVRoldRKTCKLGLiFSY/w/awV/eQUikbAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x16e58c8c3c8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "plt.scatter(data[:, 0], data[:, 1], c=target,s=50)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "接下来，构建$S_w,S_b$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "x_mean=np.mean(data,axis=0)#全局中心点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "k=np.max(target)+1#类别"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "dims=len(x_mean)#数据维度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "S_b=np.zeros(shape=(dims,dims))\n",
    "S_w=np.zeros(shape=(dims,dims))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "for j in range(0,k):\n",
    "    idx=np.argwhere(target==j).reshape(-1)\n",
    "    N_j=len(idx)\n",
    "    X_j=data[idx]\n",
    "    x_mean_j=np.mean(X_j,axis=0)\n",
    "    S_b+=N_j*((x_mean-x_mean_j).reshape(-1,1).dot((x_mean-x_mean_j).reshape(1,-1)))\n",
    "    S_w+=(X_j-x_mean_j).T.dot(X_j-x_mean_j)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[2.63855365e-02, 3.17920884e+00],\n",
       "       [3.17920884e+00, 3.83064745e+02]])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "S_b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 54.58456946, -49.38614896],\n",
       "       [-49.38614896, 110.01224398]])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "S_w"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "特征分解"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "eig_vals,eig_vecs=np.linalg.eig(np.linalg.inv(S_w).dot(S_b))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.        , 5.95245881])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "eig_vals"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.99996556, -0.67490476],\n",
       "       [ 0.00829912, -0.73790485]])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "eig_vecs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "#重新排序\n",
    "sorted_indice=np.argsort(-1*eig_vals)\n",
    "eig_vals=eig_vals[sorted_indice]\n",
    "eig_vecs[:]=eig_vecs[:,sorted_indice]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "检验新数据分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "new_data=data.dot(eig_vecs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x16e5c83bda0>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHN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cwq6HlwdxswTVV/53aechCRFhEZ1PN9FNgb+MjdVKWlqpeo6tqqOor8/8dnVPU4l2OVnIg09DxER0QagH2AkvT8qvnCrapZ4Ezg/8g/zLpPVT9wN1VpicgE4FVgtIh8LSI/cTtTmYwFjid/h/ZOz9f+bocqseHAsyLyHvmbjqdUtWa7y9W4YcBLIvIu8AYwSVWfLMWBa747oDHG1Jqav+M2xphaY4XbGGM8xgq3McZ4jBVuY4zxGCvcxhjjMVa4jTHGY6xwG2OMx1jhNsYYj/n/0jXYtwuOPgMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x16e5c7c9898>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(new_data[:, 0], new_data[:, 1], c=target,s=50)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可以发现只需要第一个坐标轴(k-1)即可将两类数据分割开，接下来对代码做一下整理，放到`ml_models.decomposition.LDA`中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
